package com.hsbc.dev.teamo4.sms.sm.dto;

import com.google.common.collect.Lists;
import com.hsbc.dev.teamo4.sms.sm.po.Department;
import com.mchange.v2.beans.BeansUtils;
import org.springframework.beans.BeanUtils;

import java.util.List;

/**
 * @author:Kevin
 * @version:
 * @Project: permission_manage
 * @Package: com.hsbc.dev.teamo4.sms.sm.dto
 * @Description:
 * @Date date: 2018/7/28
 */
public class DepartmentDto extends Department{

    private List<DepartmentDto> departmentDtoList= Lists.newArrayList();

    /**
     * adapt
     * @param department
     * @return DepartmentDto
     */
    public static DepartmentDto adapt(Department department){
        DepartmentDto departmentDto=new DepartmentDto();
        BeanUtils.copyProperties(department,departmentDto);
        return departmentDto;
    }

    public List<DepartmentDto> getDepartmentDtoList() {
        return departmentDtoList;
    }

    public void setDepartmentDtoList(List<DepartmentDto> departmentDtoList) {
        this.departmentDtoList = departmentDtoList;
    }
}
